<template>
  <div class="container">
    <router-link to="/product/dji-air-2s">
      <showProduct :msg="firstProduct"> </showProduct
    ></router-link>
    <router-link to="">
      <showProduct :msg="secondProduct"> </showProduct
    ></router-link>
    <router-link to="">
      <showProduct :msg="thirdProduct"> </showProduct
    ></router-link>
  </div>
</template>

<script>
import { singleGood } from "@/assets/tool/request.js";
import showProductStyle1 from "./showProductStyle1.vue";
export default {
  components: {
    showProduct: showProductStyle1,
  },
  data() {
    return {
      firstProduct: {},
      secondProduct: {},
      thirdProduct: {},
    };
  },

  async created() {
    let res = await singleGood(676);
    this.firstProduct = res.data.result;
    let res2 = await singleGood(677);
    this.secondProduct = res2.data.result;
    // console.log(this.secondProduct);
    let res3 = await singleGood(678);
    this.thirdProduct = res3.data.result;
  },
};
</script>

<style lang="scss" scoped>
.container {
  display: flex;
  width: 1200px;
  justify-content: space-between;
  margin: 0 auto;
}
</style>